﻿import QtQuick 2.3
import QtQuick.Controls 1.2
import QmlObjectTest 1.0
import QtQuick.Dialogs 1.2
import QtQuick.Window 2.2
import QtQuick.Controls.Styles 1.4
import QtQuick.Controls.Private 1.0
import QtMultimedia 5.5

import MainWindow 1.0
//import UpMainWindow 1.0

import QtMultimedia 5.8

//import "qml/"

import MyCommon 1.0
//portrait
//landscape

Item {
    id: window
    anchors.fill: parent


    MyCommon{
        id: common
    }

    MainWindow{
        id: mainWindow
//        SequentialAnimation on frame {
//            NumberAnimation{ to: 200; duration: 5000; easing.type: Easing.Linear }
//            NumberAnimation{ to: 0; duration: 5000; easing.type: Easing.Linear }
//            loops: Animation.Infinite
//            running: true
//        }
        SequentialAnimation on xPositionCamera {
            NumberAnimation{ from: 0.5; to: -0.5; duration: 2000; easing.type: Easing.Linear }
            NumberAnimation{ to: 0.5; duration: 2000; easing.type: Easing.Linear }
            loops: Animation.Infinite
            running: true
        }
    }


//    UpMainWindow{
//        id: upMainWindow

//        SequentialAnimation on frame {
//            NumberAnimation{ to: 200; duration: 5000; easing.type: Easing.Linear }
//            NumberAnimation{ to: 0; duration: 5000; easing.type: Easing.Linear }
//            loops: Animation.Infinite
//            running: true
//        }
//    }

    Rectangle {
        id: rect
        color: Qt.rgba(1, 1, 1, 0.7)
        radius: 5
        border.width: 1
        border.color: "white"
        anchors.fill: label

    }

    Text {
        z: 2
        id: label
        color: "red"
        wrapMode: Text.WordWrap
        text: "opengl and qml 混合编程"
        font.pointSize: 20
        x: (parent.width-width)/2
        y: 100
        font.family: "微软雅黑"
    }

    MouseArea{
        anchors.fill: parent
        drag.target: label
    }

}

